package com.dcy.znoa.service.publiz;

import com.baomidou.mybatisplus.plugins.Page;
import com.dcy.znoa.common.exception.BusinessException;
import com.dcy.znoa.common.util.pojo.JsonCommon;
import com.dcy.znoa.common.util.pojo.JsonForList;
import com.dcy.znoa.controller.publiz.model.message.QueryEntityModel;
import com.dcy.znoa.controller.publiz.model.message.SelectMessageModel;
import com.dcy.znoa.controller.publiz.model.message.SelectMsgGroupModel;
import com.dcy.znoa.domain.publiz.Message;
import com.dcy.znoa.domain.sys.MsgItemVo;

import java.lang.reflect.InvocationTargetException;

public interface MessageService {

    JsonCommon insert(Message var1);

    JsonCommon updateById(Message var1);//修改和逻辑删除都用这个方法实现

    JsonForList selectList(SelectMessageModel model) throws InvocationTargetException, IllegalAccessException;

    Page selectListMapper(SelectMessageModel model) throws InvocationTargetException, IllegalAccessException;

    MsgItemVo selectGroupItemByOperId(SelectMsgGroupModel model);

    JsonForList selectReadListByType(SelectMessageModel model);

    JsonForList selectUnReadListByType(SelectMessageModel model);

    JsonForList selectListByType(SelectMessageModel model);

    //0 为没有消息 1 为已经设置为已读了 ,null为错误
    Integer readMsg(Long operId, String entityTbl,Long entityId);

    Object queryEntityByEId(QueryEntityModel model) throws BusinessException, InvocationTargetException, IllegalAccessException;//type参数暂时用不到
}
